home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
C Templates
/
Alert.c
next >
Wrap
Text File
|
1994-04-12
|
5KB
|
182 lines
$$Loop Alerts
$$Message User Alert, u:$Worksheet.name$.h
$$File u:$Worksheet.name$.h
/* $Worksheet.name$ Handle this alert */
/* $CopyRight$ */
/* File name: $Worksheet.name$.h
Function: Handle this alert.
$$if Alert.Stop
This is a STOP alert, it is used to inform the user that data is about to be lost.
It is also used for fatal type errors and tells the user about the error.
$$endif
$$if Alert.Note
This is a NOTE alert, it is used to inform the user of some general information.
This alert is not used if there is a possibility of losing any data.
$$endif
$$if Alert.Caution
This is a CAUTION alert, it is used to inform the user that if the current path
is taken then data may be lost. The user can change the present course and
save the data. This is the type of alert used to tell the user that he needs to
save the data before going on.
$$endif
This alert is called when:
The choices in this alert allow for:
History: $Date$ Original by $Author$
*/
/* ======================================================= */
/* This routine is called at program startup to allow setting of any special */
/* items for the alert */
void A_Init_$Worksheet.name$(void);
/* This routine is called while inside of the Alert filter */
/* theDialog is the dialog(alert) pointer */
/* theEvent is the event that we are to see if we should filter */
/* itemHit is the item we set if we handle the event ourselves */
Boolean Filter_$Worksheet.name$(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
/* This routine is called after the alert has been responded to */
/* itemHit is the item that was selected */
void A_Hit_$Worksheet.name$(short itemHit);
/* ======================================================= */
$$CloseFile
$$Message User Alert, u:$Worksheet.name$.c
$$File u:$Worksheet.name$.c
/* $Worksheet.name$ Handle this alert */
/* $CopyRight$ */
/* File name: $Worksheet.name$.c
Function: Handle this alert.
$$if Alert.Stop
This is a STOP alert, it is used to inform the user that data is about to be lost.
It is also used for fatal type errors and tells the user about the error.
$$endif
$$if Alert.Note
This is a NOTE alert, it is used to inform the user of some general information.
This alert is not used if there is a possibility of losing any data.
$$endif
$$if Alert.Caution
This is a CAUTION alert, it is used to inform the user that if the current path
is taken then data may be lost. The user can change the present course and
save the data. This is the type of alert used to tell the user that he needs to
save the data before going on.
$$endif
This alert is called when:
The choices in this alert allow for:
History: $Date$ Original by $Author$
*/
#include "mmCommon$Prototype.name$.h" /* Common */
#include "Common$Prototype.name$.h" /* Common */
#include "$Worksheet.name$.h" /* This file */
#pragma segment Alerts
/* ======================================================= */
/* Routine: A_Init_$Worksheet.name$ */
/* Purpose: This routine is called at program startup to allow setting of any special */
/* items for the alert */
void A_Init_$Worksheet.name$(void)
{
}
/* ======================================================= */
/* Routine: Filter_Caution_alert */
/* Purpose: This routine is called while inside of the Alert filter */
Boolean Filter_$Worksheet.name$(DialogPtr theDialog, EventRecord *theEvent,short *itemHit)
{
Boolean the_Filter_$Worksheet.name$;
the_Filter_$Worksheet.name$ = FALSE; /* Let the Alert routine handle it */
return(the_Filter_$Worksheet.name$); /* return the result */
}
/* ======================================================= */
/* Routine: A_Hit_$Worksheet.name$ */
/* Purpose: This routine is called after the alert has been responded to */
/* itemHit is the item that was selected */
void A_Hit_$Worksheet.name$(short itemHit)
{
$$Loop Control.type = Button
$$if Control.Default
/* This is the default selection, when RETURN is pressed. */
$$endif Control.Default
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$EndLoop Control.type
$$Loop Control.type = Icon
$$if Control.NonGraphic
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$endif
$$EndLoop
$$Loop Control.type = UButton
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$EndLoop
$$Loop Control.type = HotRect
$$if Control.HotSpot
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$endif Control.HotSpot
$$EndLoop
$$Loop Control.type = Sicn
$$if Control.NonGraphic
if (ResA_$Control.name$ == itemHit) /* $Control.FullName$,See if this control was selected */
{
}
$$endif Control.NonGraphic
$$EndLoop
}
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$EndLoop